package com.xishu.report;

import com.xishu.dao.jpa.ReportDataDao;
import com.xishu.util.BeanUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.persistence.Tuple;
import java.util.List;

public class OrderPayedNumberReport implements ICacheReport {
    private static Logger logger = LoggerFactory.getLogger(OrderPayedNumberReport.class);

    @Override
    public List<Tuple> report(Long shopId, Long startTime, Long endTime, Long timeUnit) {
        logger.info("shop id {} start time {} end time {} time unit {}", shopId, startTime, endTime, timeUnit);
        ReportDataDao reportDataDao = BeanUtil.getBean(ReportDataDao.class);
        return reportDataDao.reportPayedOrderNumber(shopId, startTime, endTime, timeUnit);
    }
}
